Ext.ux.DesktopPanel = Ext.extend(Ext.Panel, {
	title_bak: "您所在位置",
	title_split: " -> ",
	title: " ",
	//html: "<iframe id='desktop-iframe' width='100%' height='100%' cellpadding='0' frameborder='0' src=''></iframe>",	
	afterRender: function(){
		var me = this;
		Ext.ux.DesktopPanel.superclass.afterRender.call(me);
		me.setTitle(
		me.title_bak + me.title_split + "首页");
		me.body.getUpdater().update({url: "welcome.html"});
	},
	setIframe: function(node){
		this.removeAll();
		var me = this,
			parentName = node.parentNode.attributes.text,
			name = node.attributes.text,
			url = node.attributes.url;
		me.setTitle(
			me.title_bak + me.title_split + parentName + me.title_split + name);
       	me.body.getUpdater().update({url: url, scripts: true,callback:function(el,success,response){
       		if(response.status==1000){
       			window.location.href="login.jsp";
       		}
       		
       	}});
	}
});
Ext.reg('gmc_desktoppanel', Ext.ux.DesktopPanel);
function getFlashObject(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};
var spot = new Ext.ux.Spotlight({
    easing: 'easeOut',
    duration: .3
});
var showimages =new Ext.Window({
    id:'showimages',
    width:600,
    height:350,
    autoScroll:true,
    modal:true,//窗口打开时屏蔽浏览器其他元素
    closeAction:'hide',//关闭按钮的效果是隐藏窗口
    title:'图片浏览',
    listeners:{
    	"resize":function(e,nw,nh){
    		if($('#imgpage')){
	    		$('#imgpage').width(e.getInnerWidth());
	    		$('#imgpage').height(e.getInnerHeight());
    		}
    	}
    }
});
var showimages1 =new Ext.Window({
    id:'showimages1',
    width:600,
    height:350,
    autoScroll:true,    
    closeAction:'hide',//关闭按钮的效果是隐藏窗口
    title:'图片浏览',
    listeners:{
    	"resize":function(e,nw,nh){
    		if($('#imgpage')){
	    		$('#imgpage').width(e.getInnerWidth());
	    		$('#imgpage').height(e.getInnerHeight());
    		}
    	}
    }
});

